<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OsinfoLoader: Libosinfo Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Libosinfo Reference Manual">
<link rel="up" href="ch01.html" title="Libosinfo">
<link rel="prev" href="OsinfoList.html" title="OsinfoList">
<link rel="next" href="OsinfoOs.html" title="OsinfoOs">
<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#OsinfoLoader.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#OsinfoLoader.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="OsinfoList.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="OsinfoOs.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="OsinfoLoader"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="OsinfoLoader.top_of_page"></a>OsinfoLoader</span></h2>
<p>OsinfoLoader — An database loader</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="OsinfoLoader.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-error-quark" title="osinfo_error_quark ()">osinfo_error_quark</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="returnvalue">OsinfoLoader</span></a> *
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-loader-new" title="osinfo_loader_new ()">osinfo_loader_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="OsinfoDb.html" title="OsinfoDb"><span class="returnvalue">OsinfoDb</span></a> *
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-loader-get-db" title="osinfo_loader_get_db ()">osinfo_loader_get_db</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-loader-process-path" title="osinfo_loader_process_path ()">osinfo_loader_process_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-loader-process-uri" title="osinfo_loader_process_uri ()">osinfo_loader_process_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-loader-process-default-path" title="osinfo_loader_process_default_path ()">osinfo_loader_process_default_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-loader-process-system-path" title="osinfo_loader_process_system_path ()">osinfo_loader_process_system_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-loader-process-local-path" title="osinfo_loader_process_local_path ()">osinfo_loader_process_local_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="OsinfoLoader.html#osinfo-loader-process-user-path" title="osinfo_loader_process_user_path ()">osinfo_loader_process_user_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="OsinfoLoader.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="OsinfoLoader.html#OSINFO-ERROR:CAPS" title="OSINFO_ERROR">OSINFO_ERROR</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="OsinfoLoader.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> OsinfoLoader
</pre>
</div>
<div class="refsect1">
<a name="OsinfoLoader.description"></a><h2>Description</h2>
<p><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="type">OsinfoLoader</span></a> provides a way to populate an <a class="link" href="OsinfoDb.html" title="OsinfoDb"><span class="type">OsinfoDb</span></a> from
a set of XML documents.</p>
</div>
<div class="refsect1">
<a name="OsinfoLoader.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="osinfo-error-quark"></a><h3>osinfo_error_quark ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
osinfo_error_quark (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets a <a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> representing the string "libosinfo"</p>
<div class="refsect3">
<a name="osinfo-error-quark.returns"></a><h4>Returns</h4>
<p> the <a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> representing the string.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-loader-new"></a><h3>osinfo_loader_new ()</h3>
<pre class="programlisting"><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="returnvalue">OsinfoLoader</span></a> *
osinfo_loader_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Create a new database loader</p>
<div class="refsect3">
<a name="osinfo-loader-new.returns"></a><h4>Returns</h4>
<p>a loader object. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-loader-get-db"></a><h3>osinfo_loader_get_db ()</h3>
<pre class="programlisting"><a class="link" href="OsinfoDb.html" title="OsinfoDb"><span class="returnvalue">OsinfoDb</span></a> *
osinfo_loader_get_db (<em class="parameter"><code><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="type">OsinfoLoader</span></a> *loader</code></em>);</pre>
<p>Retrieves the database being populated</p>
<div class="refsect3">
<a name="osinfo-loader-get-db.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>loader</p></td>
<td class="parameter_description"><p>the loader object</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="osinfo-loader-get-db.returns"></a><h4>Returns</h4>
<p>the database. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-loader-process-path"></a><h3>osinfo_loader_process_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_loader_process_path (<em class="parameter"><code><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="type">OsinfoLoader</span></a> *loader</code></em>,
                            <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>Loads data from the specified path. If the path
points to a file, that will be loaded as XML
Otherwise it can point to a directory which will
be recursively traversed, loading all files as XML.</p>
<div class="refsect3">
<a name="osinfo-loader-process-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>loader</p></td>
<td class="parameter_description"><p>the loader object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>the fully qualified path</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>filled with error information upon failure. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-loader-process-uri"></a><h3>osinfo_loader_process_uri ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_loader_process_uri (<em class="parameter"><code><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="type">OsinfoLoader</span></a> *loader</code></em>,
                           <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>,
                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>Loads data from the specified URI. If the URI
points to a file, that will be loaded as XML
Otherwise it can point to a directory which will
be recursively traversed, loading all files as XML.</p>
<div class="refsect3">
<a name="osinfo-loader-process-uri.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>loader</p></td>
<td class="parameter_description"><p>the loader object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the data source URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>filled with error information upon failure. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-loader-process-default-path"></a><h3>osinfo_loader_process_default_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_loader_process_default_path (<em class="parameter"><code><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="type">OsinfoLoader</span></a> *loader</code></em>,
                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-loader-process-system-path"></a><h3>osinfo_loader_process_system_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_loader_process_system_path (<em class="parameter"><code><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="type">OsinfoLoader</span></a> *loader</code></em>,
                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
<p>Loads data from the default paths.</p>
<div class="refsect3">
<a name="osinfo-loader-process-system-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>loader</p></td>
<td class="parameter_description"><p>the loader object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>filled with error information upon failure. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-loader-process-local-path"></a><h3>osinfo_loader_process_local_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_loader_process_local_path (<em class="parameter"><code><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="type">OsinfoLoader</span></a> *loader</code></em>,
                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="osinfo-loader-process-user-path"></a><h3>osinfo_loader_process_user_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
osinfo_loader_process_user_path (<em class="parameter"><code><a class="link" href="OsinfoLoader.html" title="OsinfoLoader"><span class="type">OsinfoLoader</span></a> *loader</code></em>,
                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
</div>
</div>
<div class="refsect1">
<a name="OsinfoLoader.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="OSINFO-ERROR:CAPS"></a><h3>OSINFO_ERROR</h3>
<pre class="programlisting">#define OSINFO_ERROR osinfo_error_quark()
</pre>
<p>Error domain for generic libosinfo errors</p>
</div>
</div>
<div class="refsect1">
<a name="OsinfoLoader.see-also"></a><h2>See Also</h2>
<p><a class="link" href="OsinfoDb.html" title="OsinfoDb"><span class="type">OsinfoDb</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29</div>
</body>
</html>